﻿@model IEnumerable<MVC01.Models.Product>

@{
    ViewBag.Title = "ProductNew";
}

<h2>ProductNew</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Name
        </th>
        <th>
            Description
        </th>
        <th>
            Price
        </th>
        <th>
            Position
        </th>
        <th>
            IsActive
        </th>
        <th>
            UrlName
        </th>
        <th>
            IsPromotion
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Price)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Position)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IsActive)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.UrlName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IsPromotion)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ProductId }) |
            @Html.ActionLink("Details", "Details", new { id=item.ProductId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ProductId })
        </td>
    </tr>
}

</table>
